﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YWTSSys.BLL;
using YWTSSys.Library;
using YWTSSys.Model;

namespace YWTSSys.Web.MachineSys.YWTSWeb.yw
{
    public partial class CustomerTelConsumerRecordList : PageBase
    {
        protected override Permission[] PowerKey
        {
            get
            {
                return new Permission[] { Permission.none };
            }
        }
        protected override string DWZRef
        {
            get
            {
                return "MyCustomerMasterList";
            }
        }

        #region 属性 (查询条件)


        protected int customerid
        {
            get
            {
                return GetRequestValue<int>("customerid", 0);

            }
        }


        /// <summary>
        /// 当前排序字段
        /// </summary>
        protected override string orderField
        {
            get
            {
                return string.IsNullOrEmpty(base.orderField) ? "电话拔打状态" : base.orderField;
            }
        }
        /// <summary>
        /// 当前排序方式
        /// </summary>
        protected override string orderDirection
        {
            get
            {
                return string.IsNullOrEmpty(base.orderDirection) ? "Desc" : base.orderDirection;
            }
        }
        #endregion



        protected void Page_Load(object sender, EventArgs e)
        {
            DataBind();
           // this.AddLog(Permission.查看, GetSql());
        }

        protected void DataBind()
        {

            this.rpTelMenu.DataSource = TelRecordController.GetByCustomerIDTop20(customerid);
            this.rpTelMenu.DataBind();

            this.rpConsumerMenu.DataSource = ConsumeRecordController.GetByCustomerId(customerid);
            this.rpConsumerMenu.DataBind();
        }
        
    }
}